<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>自动化测试报告</title>
    <meta name="generator" content="HTMLTestRunner 0.8.2"/>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    
<style type="text/css" media="screen">
body        { font-family: verdana, arial, helvetica, sans-serif; font-size: 80%; }
table       { font-size: 100%; }
pre         { }

/* -- heading ---------------------------------------------------------------------- */
h1 {
    font-size: 16pt;
    color: gray;
}
.heading {
    margin-top: 0ex;
    margin-bottom: 1ex;
}

.heading .attribute {
    margin-top: 1ex;
    margin-bottom: 0;
}

.button{  
    border:1px solid #cccccc;  
    cursor:pointer;  
    margin:10px 5px;  
    height:40px;  
    text-align:center;  
    border-radius: 4px;  
    border-color: #636263 #464647 #A1A3A5;  
    text-shadow: 0 1px 1px #F6F6F6;  
    background-image: -moz-linear-gradient(center top, #D9D9D9, #A6A6A6 49%, #A6A6A6 50%);  
    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #D9D9D9),color-stop(1, #A6A6A6));  
}  

.buttonText{  
    position:relative;  
    font-weight:bold;  
    top:10px;
    color:#58595B;  
}   

.heading .description {
    margin-top: 4ex;
    margin-bottom: 6ex;
}

.panel .description{  
    border:1px solid #CCCCCC;  
    border-color: #636263 #464647 #A1A3A5;  
    margin:10px 5px;  
    height:165px;  
    border-radius: 4px;  
}  
.scroll-item {  
    position: relative;  
    width: 100%;  
    height: 32px;  
    border-bottom:1px solid gray;  
    cursor: pointer;  
}  
.item-even {  
    background-color: #E7E8EC;  
}  
      
.item-odd {  
    background-color: #E0ECF6;  
}  
.rect {  
    float: left;  
    margin-top: 5px;  
    margin-left: 5px;  
    width: 20px;  
    height: 20px;  
    border-radius: 3px;  
}  
.item-text{  
    margin-left: 5px;  
    height: 100%;  
    float: left;  
    font-size: 14px;   
    vertical-align: middle;  
    display: inline-block;  
    line-height: 30px;  
}  

.bg{  
    position:absolute;  
    height:97%;  
    width:80%;  
    overflow-x: hidden;  
    overflow-y:hidden;  
}  
.panel{  
    position:absolute;  
    height:550px;  
    width:750px;  
    left:45px;  
    top:45px;  
    border-radius: 12px;  
    background-image: -moz-linear-gradient(top,#EBEBEB, #BFBFBF);  
    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #EBEBEB),color-stop(1, #BFBFBF));  
    }  
.panel1{  
    position:absolute;  
    height:550px;  
    width:200px;  
    left:800px;  
    top:45px;  
    border-radius: 12px;  
    background-image: -moz-linear-gradient(top,#EBEBEB, #BFBFBF);  
    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #EBEBEB),color-stop(1, #BFBFBF));  
    } 
.panelBg{  
    position:absolute;  
    height:600px;  
    width:1000px;  
    left:20px;  
    top:20px;  
    border-radius: 12px;  
    background-color:#000000;  
    opacity:0.5;  
}  

.title{  
    border:1px solid green;  
    position:relative;  
    margin:5px;  
    font-size:22px;  
    font-weight:bold;  
    text-align:center;  
    color:#58595B;  
} 

.piechart{  
    border:1px solid green;  
    margin:5px;  
    height:170px;  
} 

.barchart{  
    border:1px solid green;  
    margin:5px;  
    height:170px;  
}  

.linechart{  
    border:1px solid green;  
    margin:5px;  
    height:170px;  
} 
     
.subTitle{  
    border:1px solid green;  
    margin:5px;   
    font-size:14px;  
    height:70px;  
    font-weight:bold;  
    text-indent:2em;  
    color:#6D6E71;  
}  

/* -- css div popup ------------------------------------------------------------------------ */
a.popup_link {
}

a.popup_link:hover {
    color: red;
}

.popup_window {
    display: none;
    position: relative;
    left: 0px;
    top: 0px;
    /*border: solid #627173 1px; */
    padding: 10px;
    background-color: #E6E6D6;
    font-family: "Lucida Console", "Courier New", Courier, monospace;
    text-align: left;
    font-size: 8pt;
    width: 500px;
}

}
/* -- report ------------------------------------------------------------------------ */
#show_detail_line {
    margin-top: 3ex;
    margin-bottom: 1ex;
}
#result_table {
    width: 80%;
    border-collapse: collapse;
    border: 1px solid #777;
}
#header_row {
    font-weight: bold;
    color: white;
    background-color: #777;
}
#result_table td {
    border: 2px solid #777;
    padding: 3px;
}
#total_row  { font-weight: bold; }
.passClass  { background-color: #6c6; }
.failClass  { background-color: #c60; }
.errorClass { background-color: #c00; }
.passCase   { color: #6c6; font-weight: bold;}
.failCase   { color: #c60; font-weight: bold; }
.errorCase  { color: #c00; font-weight: bold; }
.hiddenRow  { display: none; }
.testcase   { margin-left: 2em; }

#section1{  
    border:1px solid green;  
    position:relative;  
    float:left;  
    width:235px;  
    height:530px;  
    top:10px;  
    left:10px;  
}  
#section2{  
    border:1px solid green;  
    position:relative;  
    float:left;  
    width:235px;  
    height:530px;  
    top:10px;  
    left:20px;  
}  
#section3{  
    border:1px solid green;  
    position:relative;  
    float:left;  
    width:235px;  
    height:530px;  
    top:10px;  
    left:30px;  
}  
#section4{  
    border:1px solid green;  
    position:relative;  
    float:left;  
    width:180px;  
    height:530px;  
    top:10px;  
    left:10px;  
}  

/* -- ending ---------------------------------------------------------------------- */
#ending {
}

</style>

</head>
<body style="background-color:#C0C0C0" >
<script language="javascript" type="text/javascript"><!--
output_list = Array();

/* level - 0:Summary; 1:Pass; 2:Fail; 3:Error; 4:All */
function showCase(level) {
    trs = document.getElementsByTagName("tr");
    for (var i = 0; i < trs.length; i++) {
        tr = trs[i];
        id = tr.id;
        if (id.substr(0,2) == 'Ft') {
            if (level == 2) {
                tr.className = '';
            }
            else if(level == 4) {
                tr.className = '';
            }
            else if(level == 5) {
                tr.className = '';
            }
            else{
                tr.className = 'hiddenRow';
            }
        }
        if (id.substr(0,2) == 'Pt') {
            if (level == 1) {
                tr.className = '';
            }
            else if(level == 4 ) {
                tr.className = '';
            }
            else{
                tr.className = 'hiddenRow';
            }
        }
        if (id.substr(0,2) == 'Et') {
            if (level == 3) {
                tr.className = '';
            }
            else if(level == 4 ) {
                tr.className = '';
            }
            else if(level == 5 ) {
                tr.className = '';
            }
            else{
                tr.className = 'hiddenRow';
            }
        }
    }
}

function showClassDetail(cid, count) {
    var id_list = Array(count);
    var toHide = 1;
    for (var i = 0; i < count; i++) {
        tid0 = 't' + cid.substr(1) + '.' + (i+1);
        tid = 'F' + tid0;
        tr = document.getElementById(tid);
        if (!tr) {
            tid = 'P' + tid0;
            tr = document.getElementById(tid);
            if(!tr){
                tid = 'E' + tid0;
                tr = document.getElementById(tid);
            }
        }
        id_list[i] = tid;
        if (tr.className) {
            toHide = 0;
        }
    }
    for (var i = 0; i < count; i++) {
        tid = id_list[i];
        if (toHide) {
            document.getElementById('div_'+tid).style.display = 'none'
            document.getElementById(tid).className = 'hiddenRow';
        }
        else {
            document.getElementById(tid).className = '';
        }
    }
}


function showTestDetail(div_id){
    var details_div = document.getElementById(div_id)
    var displayState = details_div.style.display
    // alert(displayState)
    if (displayState != 'block' ) {
        displayState = 'block'
        details_div.style.display = 'block'
    }
    else {
        details_div.style.display = 'none'
    }
}


function html_escape(s) {
    s = s.replace(/&/g,'&amp;');
    s = s.replace(/</g,'&lt;');
    s = s.replace(/>/g,'&gt;');
    return s;
}

/* obsoleted by detail in <div>
function showOutput(id, name) {
    var w = window.open("", //url
                    name,
                    "resizable,scrollbars,status,width=800,height=450");
    d = w.document;
    d.write("<pre>");
    d.write(html_escape(output_list[id]));
    d.write("\n");
    d.write("<a href='javascript:window.close()'>close</a>\n");
    d.write("</pre>\n");
    d.close();
}
*/
--></script>

<div class='heading'>
<h1>自动化测试报告</h1>
<p class='attribute'><strong>Start Time:</strong> 2018-03-28 17:04:58</p>
<p class='attribute'><strong>Duration:</strong> 0:01:54.267000</p>
<p class='attribute'><strong>Status:</strong> Pass 1 Error 7</p>

<p class='description'>用例执行情况：</p>
</div>



<p id='show_detail_line'>Show
<a href='javascript:showCase(0)'>Summary</a>
<a href='javascript:showCase(1)'>Pass</a>
<a href='javascript:showCase(2)'>Fail</a>
<a href='javascript:showCase(3)'>Error</a>
<a href='javascript:showCase(5)'>Fail&Error</a>
<a href='javascript:showCase(4)'>All</a>
</p>
<table id='result_table'>
<colgroup>
<col align='left' />
<col align='right' />
<col align='right' />
<col align='right' />
<col align='right' />
<col align='right' />
</colgroup>
<tr id='header_row'>
    <td>Test Group/Test case</td>
    <td>Count</td>
    <td>Pass</td>
    <td>Fail</td>
    <td>Error</td>
    <td>CaseInfo</td>
</tr>

<tr class='passClass'>
    <td>test_case001_registered.Test_login</td>
    <td>1</td>
    <td>1</td>
    <td>0</td>
    <td>0</td>
    <td><a href="javascript:showClassDetail('c1',1)">Detail</a></td>
</tr>

<tr id='Pt1.1' class='hiddenRow'>
    <td class='passCase'><div class='testcase'>test01: 账号密码正确登录</div></td>
    <td colspan='4' align='center'>

    <!--css div popup start-->
    <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_Pt1.1')" >
        pass</a>

    <div id='div_Pt1.1' class="popup_window">
        <div style='text-align: right; color:red;cursor:pointer'>
        <a onfocus='this.blur();' onclick="document.getElementById('div_Pt1.1').style.display = 'none' " >
           [x]</a>
        </div>
        <pre>
        
Pt1.1: [2018-03-28 17:04:58,704](INFO)root : ----------------------------------------over


        </pre>
    </div>
    <!--css div popup end-->

    </td>
    <td colspan='1' align='center'>
No Case Detail
</td>
</tr>

<tr class='errorClass'>
    <td>test_case002_Login.Test_login</td>
    <td>5</td>
    <td>0</td>
    <td>0</td>
    <td>5</td>
    <td><a href="javascript:showClassDetail('c2',5)">Detail</a></td>
</tr>

<tr id='Et2.1' class='none'>
    <td class='errorCase'><div class='testcase'>test01: 账号密码正确登录</div></td>
    <td colspan='4' align='center'>

    <!--css div popup start-->
    <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_Et2.1')" >
        error</a>

    <div id='div_Et2.1' class="popup_window">
        <div style='text-align: right; color:red;cursor:pointer'>
        <a onfocus='this.blur();' onclick="document.getElementById('div_Et2.1').style.display = 'none' " >
           [x]</a>
        </div>
        <pre>
        
Et2.1: [2018-03-28 17:04:58,720](INFO)root : 账号密码正确登录---------------------------SEND
[2018-03-28 17:04:59,000](INFO)root : &gt;&gt;&gt;获取excel表格内容：/auth/login/
[2018-03-28 17:04:59,000](INFO)root : url地址：http://api220.ezhibang.cn///auth/login/
[2018-03-28 17:04:59,017](INFO)root : &gt;&gt;&gt;获取excel表格内容：{'a':'------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"phone\"\r\n\r\n13590283182\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"password\"\r\n\r\n123456\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--'}
[2018-03-28 17:04:59,017](INFO)root : 输入的账号密码为：------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="phone"

13590283182
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="password"

123456
------WebKitFormBoundary7MA4YWxkTrZu0gW--
[2018-03-28 17:04:59,035](INFO)root : &gt;&gt;&gt;获取excel表格内容：{
    'content-type': "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW",
    'cache-control': "no-cache",
    'postman-token': "c4625f6a-55d7-5f02-96f4-5a27bc49c875"
    }
[2018-03-28 17:04:59,036](INFO)root : 请求头：{'cache-control': 'no-cache', 'postman-token': 'c4625f6a-55d7-5f02-96f4-5a27bc49c875', 'content-type': 'multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW'}
[2018-03-28 17:05:28,118](INFO)root : ----------------------------------------over
Traceback (most recent call last):
  File "C:\Users\Administrator\Desktop\python01\fengfan_interface\feng_test_case\test_case002_Login.py", line 22, in test01
    r=response.json()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\requests\models.py", line 892, in json
    return complexjson.loads(self.text, **kwargs)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\json\__init__.py", line 319, in loads
    return _default_decoder.decode(s)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\json\decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\json\decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 2 (char 1)


        </pre>
    </div>
    <!--css div popup end-->

    </td>
    <td colspan='1' align='center'>
No Case Detail
</td>
</tr>

<tr id='Et2.2' class='none'>
    <td class='errorCase'><div class='testcase'>test02: 账号为空输入密码</div></td>
    <td colspan='4' align='center'>

    <!--css div popup start-->
    <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_Et2.2')" >
        error</a>

    <div id='div_Et2.2' class="popup_window">
        <div style='text-align: right; color:red;cursor:pointer'>
        <a onfocus='this.blur();' onclick="document.getElementById('div_Et2.2').style.display = 'none' " >
           [x]</a>
        </div>
        <pre>
        
Et2.2: [2018-03-28 17:05:28,219](INFO)root : 账号为空输入密码---------------------------SEND
[2018-03-28 17:05:28,250](INFO)root : &gt;&gt;&gt;获取excel表格内容：/auth/login/
[2018-03-28 17:05:28,250](INFO)root : url地址：http://api220.ezhibang.cn///auth/login/
[2018-03-28 17:05:28,279](INFO)root : &gt;&gt;&gt;获取excel表格内容：{"a":"------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"phone\"\r\n\r\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"password\"\r\n\r\n123456\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--"}
[2018-03-28 17:05:28,279](INFO)root : 输入的账号密码为：------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="phone"


------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="password"

123456
------WebKitFormBoundary7MA4YWxkTrZu0gW--
[2018-03-28 17:05:28,309](INFO)root : &gt;&gt;&gt;获取excel表格内容：{
    'content-type': "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW",
    'cache-control': "no-cache",
    'postman-token': "f108db69-f82e-062a-9f37-6b8894501af1"
    }
data类型： &lt;class 'str'&gt;
headers类型： &lt;class 'dict'&gt;
[2018-03-28 17:05:49,316](INFO)root : [Fiddler] The connection to 'api220.ezhibang.cn' failed. &lt;br /&gt;Error: TimedOut (0x274c). &lt;br /&gt;System.Net.Sockets.SocketException 由于连接方在一段时间后没有正确答复或连接的主机没有反应，连接尝试失败。 120.76.199.81:80                                                                                                                                                                                                                                                                                                                                          
[2018-03-28 17:05:49,318](INFO)root : ----------------------------------------over
Traceback (most recent call last):
  File "C:\Users\Administrator\Desktop\python01\fengfan_interface\feng_test_case\test_case002_Login.py", line 42, in test02
    r=response.json()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\requests\models.py", line 892, in json
    return complexjson.loads(self.text, **kwargs)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\json\__init__.py", line 319, in loads
    return _default_decoder.decode(s)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\json\decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\json\decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 2 (char 1)


        </pre>
    </div>
    <!--css div popup end-->

    </td>
    <td colspan='1' align='center'>
No Case Detail
</td>
</tr>

<tr id='Et2.3' class='none'>
    <td class='errorCase'><div class='testcase'>test03: 输入账号，密码为空</div></td>
    <td colspan='4' align='center'>

    <!--css div popup start-->
    <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_Et2.3')" >
        error</a>

    <div id='div_Et2.3' class="popup_window">
        <div style='text-align: right; color:red;cursor:pointer'>
        <a onfocus='this.blur();' onclick="document.getElementById('div_Et2.3').style.display = 'none' " >
           [x]</a>
        </div>
        <pre>
        
Et2.3: [2018-03-28 17:05:49,361](INFO)root : 账号为空输入密码---------------------------SEND
[2018-03-28 17:05:49,380](INFO)root : &gt;&gt;&gt;获取excel表格内容：/auth/login/
[2018-03-28 17:05:49,381](INFO)root : url地址：http://api220.ezhibang.cn///auth/login/
[2018-03-28 17:05:49,398](INFO)root : &gt;&gt;&gt;获取excel表格内容：{"a":"------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"phone\"\r\n\r\n13590283182\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"password\"\r\n\r\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--"}
[2018-03-28 17:05:49,398](INFO)root : 输入的账号密码为：------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="phone"

13590283182
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="password"


------WebKitFormBoundary7MA4YWxkTrZu0gW--
[2018-03-28 17:05:49,417](INFO)root : &gt;&gt;&gt;获取excel表格内容：{
    'content-type': "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW",
    'cache-control': "no-cache",

    }
[2018-03-28 17:06:10,426](INFO)root : [Fiddler] The connection to 'api220.ezhibang.cn' failed. &lt;br /&gt;Error: TimedOut (0x274c). &lt;br /&gt;System.Net.Sockets.SocketException 由于连接方在一段时间后没有正确答复或连接的主机没有反应，连接尝试失败。 120.76.199.81:80                                                                                                                                                                                                                                                                                                                                          
[2018-03-28 17:06:10,427](INFO)root : ----------------------------------------over
Traceback (most recent call last):
  File "C:\Users\Administrator\Desktop\python01\fengfan_interface\feng_test_case\test_case002_Login.py", line 55, in test03
    r = response.json()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\requests\models.py", line 892, in json
    return complexjson.loads(self.text, **kwargs)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\json\__init__.py", line 319, in loads
    return _default_decoder.decode(s)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\json\decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\json\decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 2 (char 1)


        </pre>
    </div>
    <!--css div popup end-->

    </td>
    <td colspan='1' align='center'>
No Case Detail
</td>
</tr>

<tr id='Et2.4' class='none'>
    <td class='errorCase'><div class='testcase'>test04: 账号正确，密码错误</div></td>
    <td colspan='4' align='center'>

    <!--css div popup start-->
    <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_Et2.4')" >
        error</a>

    <div id='div_Et2.4' class="popup_window">
        <div style='text-align: right; color:red;cursor:pointer'>
        <a onfocus='this.blur();' onclick="document.getElementById('div_Et2.4').style.display = 'none' " >
           [x]</a>
        </div>
        <pre>
        
Et2.4: [2018-03-28 17:06:10,460](INFO)root : 账号为空输入密码---------------------------SEND
[2018-03-28 17:06:10,486](INFO)root : &gt;&gt;&gt;获取excel表格内容：/auth/login/
[2018-03-28 17:06:10,486](INFO)root : url地址：http://api220.ezhibang.cn//auth/login/
[2018-03-28 17:06:10,505](INFO)root : &gt;&gt;&gt;获取excel表格内容：{"a":"------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"phone\"\r\n\r\n13590283182\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"password\"\r\n\r\n123456789\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--"}
[2018-03-28 17:06:10,523](INFO)root : &gt;&gt;&gt;获取excel表格内容：{
    'content-type': "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW",
    'cache-control': "no-cache",
    'postman-token': "7f46b4d8-80d5-54d0-61a4-54b2abe5d9e6"
    }
[2018-03-28 17:06:31,525](INFO)root : 账号为空输入密码接口返回数据:[Fiddler] The connection to 'api220.ezhibang.cn' failed. &lt;br /&gt;Error: TimedOut (0x274c). &lt;br /&gt;System.Net.Sockets.SocketException 由于连接方在一段时间后没有正确答复或连接的主机没有反应，连接尝试失败。 120.76.199.81:80                                                                                                                                                                                                                                                                                                                                          
[2018-03-28 17:06:31,526](INFO)root : ----------------------------------------over
Traceback (most recent call last):
  File "C:\Users\Administrator\Desktop\python01\fengfan_interface\feng_test_case\test_case002_Login.py", line 69, in test04
    r=response.json()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\requests\models.py", line 892, in json
    return complexjson.loads(self.text, **kwargs)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\json\__init__.py", line 319, in loads
    return _default_decoder.decode(s)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\json\decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\json\decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 2 (char 1)


        </pre>
    </div>
    <!--css div popup end-->

    </td>
    <td colspan='1' align='center'>
No Case Detail
</td>
</tr>

<tr id='Et2.5' class='none'>
    <td class='errorCase'><div class='testcase'>test05: 账号错误密码正确</div></td>
    <td colspan='4' align='center'>

    <!--css div popup start-->
    <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_Et2.5')" >
        error</a>

    <div id='div_Et2.5' class="popup_window">
        <div style='text-align: right; color:red;cursor:pointer'>
        <a onfocus='this.blur();' onclick="document.getElementById('div_Et2.5').style.display = 'none' " >
           [x]</a>
        </div>
        <pre>
        
Et2.5: [2018-03-28 17:06:31,572](INFO)root : 账号为空输入密码---------------------------SEND
[2018-03-28 17:06:31,591](INFO)root : &gt;&gt;&gt;获取excel表格内容：/auth/login/
[2018-03-28 17:06:31,608](INFO)root : &gt;&gt;&gt;获取excel表格内容：{"a":"------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"phone\"\r\n\r\n1359028318\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"password\"\r\n\r\n123456\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--"}
[2018-03-28 17:06:31,628](INFO)root : &gt;&gt;&gt;获取excel表格内容：{
    'content-type': "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW",
    'cache-control': "no-cache",
    'postman-token': "d85b3ac6-71bf-9955-a921-2a626b68644d"
    }
[2018-03-28 17:06:52,640](INFO)root : 账号为空输入密码接口返回数据:[Fiddler] The connection to 'api220.ezhibang.cn' failed. &lt;br /&gt;Error: TimedOut (0x274c). &lt;br /&gt;System.Net.Sockets.SocketException 由于连接方在一段时间后没有正确答复或连接的主机没有反应，连接尝试失败。 120.76.199.81:80                                                                                                                                                                                                                                                                                                                                          
[2018-03-28 17:06:52,640](INFO)root : ----------------------------------------over
Traceback (most recent call last):
  File "C:\Users\Administrator\Desktop\python01\fengfan_interface\feng_test_case\test_case002_Login.py", line 81, in test05
    r=response.json()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\requests\models.py", line 892, in json
    return complexjson.loads(self.text, **kwargs)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\json\__init__.py", line 319, in loads
    return _default_decoder.decode(s)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\json\decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\json\decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 2 (char 1)


        </pre>
    </div>
    <!--css div popup end-->

    </td>
    <td colspan='1' align='center'>
No Case Detail
</td>
</tr>

<tr class='errorClass'>
    <td>test_case003_back.Test_banner</td>
    <td>2</td>
    <td>0</td>
    <td>0</td>
    <td>2</td>
    <td><a href="javascript:showClassDetail('c3',2)">Detail</a></td>
</tr>

<tr id='Et3.1' class='none'>
    <td class='errorCase'><div class='testcase'>test01: 获取用户基本信息</div></td>
    <td colspan='4' align='center'>

    <!--css div popup start-->
    <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_Et3.1')" >
        error</a>

    <div id='div_Et3.1' class="popup_window">
        <div style='text-align: right; color:red;cursor:pointer'>
        <a onfocus='this.blur();' onclick="document.getElementById('div_Et3.1').style.display = 'none' " >
           [x]</a>
        </div>
        <pre>
        
Et3.1: Traceback (most recent call last):
  File "C:\Users\Administrator\Desktop\python01\fengfan_interface\feng_test_case\test_case003_back.py", line 11, in setUp
    ApiKey=StartInterFace().startIF(MustCode['账号密码13590283182'],MustCode["请求头"])['data']['apikey']
KeyError: '账号密码13590283182'


        </pre>
    </div>
    <!--css div popup end-->

    </td>
    <td colspan='1' align='center'>
No Case Detail
</td>
</tr>

<tr id='Et3.2' class='none'>
    <td class='errorCase'><div class='testcase'>test02</div></td>
    <td colspan='4' align='center'>

    <!--css div popup start-->
    <a class="popup_link" onfocus='this.blur();' href="javascript:showTestDetail('div_Et3.2')" >
        error</a>

    <div id='div_Et3.2' class="popup_window">
        <div style='text-align: right; color:red;cursor:pointer'>
        <a onfocus='this.blur();' onclick="document.getElementById('div_Et3.2').style.display = 'none' " >
           [x]</a>
        </div>
        <pre>
        
Et3.2: Traceback (most recent call last):
  File "C:\Users\Administrator\Desktop\python01\fengfan_interface\feng_test_case\test_case003_back.py", line 11, in setUp
    ApiKey=StartInterFace().startIF(MustCode['账号密码13590283182'],MustCode["请求头"])['data']['apikey']
KeyError: '账号密码13590283182'


        </pre>
    </div>
    <!--css div popup end-->

    </td>
    <td colspan='1' align='center'>
No Case Detail
</td>
</tr>

<tr id='total_row'>
    <td>Total and Rate</td>
    <td>8</td>
    <td>1</td>
    <td>0</td>
    <td>7</td>
    <td>Proportion:1/8</td>
</tr>
</table>

<div id='ending'>&nbsp;</div>
<div class="bg">
                       <div class="panelBg"></div>  
                       <div class="panel"> 
                       <div id="section1"> 
                           <div class="title">Pie Chart</div>  
                           <div class="subTitle">This chart is to show the rate that statis of test cases</div> 
                           <div class="piechart">   
                               <canvas id="circle" width="225" height="168" onmousemove='javascript:drawCircle(1, 0, 7)'>your browser does not support the canvas tag</canvas>
                           </div> 
                           <div class="description">  
                           <div class="scroll-item item-even">  
                               <div class="rect" style="background-color: #6c6; "></div>  
                               <div class="item-text">Passcase:1</div>  
                           </div>  
                           <div class="scroll-item item-odd">  
                               <div class="rect" style="background-color: #c60; "></div>  
                               <div class="item-text">failcase:0</div>  
                           </div>   
                           <div class="scroll-item item-even">  
                               <div class="rect" style="background-color: #c00; "></div>  
                               <div class="item-text">errorcase:7</div>  
                           </div> 
                           <div class="scroll-item item-odd">  
                           </div> 
                           <div class="scroll-item item-even">    
                           </div> 
                       </div> 

                       </div>  
                       <div id="section2">  
                       <div class="title">Bar Chart</div>  
                           <div class="subTitle">This chart is to show the count that statis of test cases</div> 
                           <div class="barchart">   
                               <canvas id="bar" width="225" height="168" onclick='javascript:drawBar(1, 0, 7)'>your browser does not support the canvas tag</canvas>
                           </div> 
                           <div class="description">  
                           <div class="scroll-item item-even">  
                               <div class="rect" style="background-color: #6c6; "></div>  
                               <div class="item-text">Passcase:1</div>  
                           </div>  
                           <div class="scroll-item item-odd">  
                               <div class="rect" style="background-color: #c60; "></div>  
                               <div class="item-text">failcase:0</div>  
                           </div>   
                           <div class="scroll-item item-even">  
                               <div class="rect" style="background-color: #c00; "></div>  
                               <div class="item-text">errorcase:7</div>  
                           </div> 
                           <div class="scroll-item item-odd">  
                           </div> 
                           <div class="scroll-item item-even">    
                           </div> 
                       </div> 

                       </div>  
                       <div id="section3"> 
                        <div class="title">Line Chart</div>  
                           <div class="subTitle">This chart is to show the rate that data of test cases</div> 
                           <div class="linechart">   
                               <canvas id="line" width="225" height="168" onclick='javascript:drawline(1, 0, 7)'>your browser does not support the canvas tag</canvas>
                           </div> 
                           <div class="description">  
                           <div class="scroll-item item-even">  
                               <div class="rect" style="background-color: #6c6; "></div>  
                               <div class="item-text">Passcase:1</div>  
                           </div>  
                           <div class="scroll-item item-odd">  
                               <div class="rect" style="background-color: #c60; "></div>  
                               <div class="item-text">failcase:0</div>  
                           </div>   
                           <div class="scroll-item item-even">  
                               <div class="rect" style="background-color: #c00; "></div>  
                               <div class="item-text">errorcase:7</div>  
                           </div> 
                           <div class="scroll-item item-odd">  
                           </div> 
                           <div class="scroll-item item-even">    
                           </div> 
                       </div> 

                       </div>
                       </div>
                       <div class="panel1">
                       <div id="section4">
                           <a>1 Pass cases, 0 fail cases, 7 error cases.</a>
                       </div>
                       </div>
                    </div>
</body>
</html>
<script type="text/javascript"> 
function drawCircle(pass, fail, error){ 
    var color = ["#6c6","#c60","#c00"];  
    var data = [pass,fail,error]; 
    var canvas = document.getElementById("circle");  
    var ctx = canvas.getContext("2d");  
    var startPoint=0;  
    for(var i=0;i<data.length;i++){  
        ctx.fillStyle = color[i];  
        ctx.beginPath();  
        ctx.moveTo(112,84);   
        ctx.arc(112,84,84,startPoint,startPoint+Math.PI*2*(data[i]/(data[0]+data[1]+data[2])),false);  
        ctx.fill();  
        startPoint += Math.PI*2*(data[i]/(data[0]+data[1]+data[2]));  
    }  
}

function FillRect(cxt, x1, y1, width, height, color) {
    cxt.fillStyle = color; 
    cxt.fillRect(x1, y1, width, height);
} 

function drawBar(pass, fail, error){ 

    var color = ["#6c6","#c60","#c00"];  
    var data = [pass,fail,error];
    var count = pass + fail + error;
    var h =[10+(1 - pass/count)*148,10+(1 - fail/count)*148,10+(1 - error/count)*148];
    var x = [30,90,150];
    var y = [70,130,190];
    var canvas = document.getElementById("bar");  
    var ctx = canvas.getContext("2d");
    DrawString(ctx, 'Count(c)', '', '', '', '', 15, 10)
    DrawLine(ctx,5,15,10,10,'black');
    DrawLine(ctx,15,15,10,10,'black');
    DrawLine(ctx,10,10,10,158,'black');
    DrawLine(ctx,10,158,215,158,'black');
    DrawLine(ctx,210,153,215,158,'black');
    DrawLine(ctx,210,163,215,158,'black');
    DrawString(ctx, 'Type(c)', '', '', '', '', 180, 160)
    for(var i=0;i<3;i++) {
        DrawLine(ctx,x[i],h[i],x[i],158,color[i]);
        DrawLine(ctx,x[i],h[i],y[i],h[i],color[i]);
        DrawLine(ctx,y[i],h[i],y[i],158,color[i]); 
        DrawLine(ctx,(y[i]+x[i])/2,153,(y[i]+x[i])/2,158,color[i]);
        DrawString(ctx, data[i], '', color[i], '', '', (y[i]+x[i])/2, h[i]-15);
        FillRect(ctx, x[i], h[i], 40, 158-h[i], color[i]);
    }
} 

function DrawP(ctx, P) {
    with (ctx) {
        moveTo(P[0],P[1]);
        lineTo(P[0]+1,P[1]+1);
     }
}

function DrawLine(cxt, x1, y1, x2, y2, color) {

    cxt.strokeStyle = color;
    cxt.beginPath();
    cxt.moveTo(x1, y1);
    cxt.lineTo(x2, y2);
    cxt.stroke();
}

function DrawString(cxt, text, font, color, align, v_align, x, y) {
    if (font == "") {
        cxt.font = "10px";
    }
    else {
        cxt.font = font;
    }
    if (color == "") {
        cxt.fillStyle = "#000000";
    }
    else {
        cxt.fillStyle = color;
    }
    if (align == "") {
        cxt.textAlign = "left";
    }
    else {
        cxt.textAlign = align;
    }
    if (v_align == "") {
        cxt.textBaseline = "top";
    }
    else {
        cxt.textBaseline = v_align;
    }
    cxt.fillText(text, x, y);
}

function drawline(pass, fail, error){ 
    var color = ["#6c6","#c60","#c00"];  
    var data = [pass,fail,error];
    var count = pass + fail + error;
    var x = [30,90,150];
    var y = [70,130,190];
    var h =[10+(1 - pass/count)*148,10+(1 - fail/count)*148,10+(1 - error/count)*148];
    var canvas = document.getElementById("line");  
    var ctx = canvas.getContext("2d");
    DrawString(ctx, 'Count(c)', '', '', '', '', 15, 10)
    DrawLine(ctx,5,15,10,10,'black');
    DrawLine(ctx,15,15,10,10,'black');
    DrawLine(ctx,10,10,10,158,'black');
    DrawLine(ctx,10,158,215,158,'black');
    DrawLine(ctx,210,153,215,158,'black');
    DrawLine(ctx,210,163,215,158,'black');
    DrawString(ctx, 'Type(c)', '', '', '', '', 180, 160)
    for(var i=0;i<3;i++) {
        p = Array((y[i]+x[i])/2,h[i]);
        DrawP(ctx,p);
        DrawLine(ctx,(y[i]+x[i])/2,153,(y[i]+x[i])/2,158,color[i]);
        DrawString(ctx, data[i], '', color[i], '', '', (y[i]+x[i])/2, h[i]-15);
        if(i < 2) {
        
            DrawLine(ctx,(y[i]+x[i])/2,h[i],(y[i+1]+x[i+1])/2,h[i+1],'black');
            
        }
        
    }
    
} 

</script>  
